package me.shiqiang.im.vo;

import me.shiqiang.im.domain.User;

/**
 * @author cuishiqiang
 * @date 2018/11/8 11:20 PM
 */
public class UserVo {
    private Long userId;
    private String name;
    private String phone;
    private String signature; // 签名
    private Integer gender;//性别
    private String area; //区域
    private String avatar;//头像

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getSignature() {
        return signature;
    }

    public void setSignature(String signature) {
        this.signature = signature;
    }

    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }


    public static UserVo of(User user) {
        UserVo vo = new UserVo();
        vo.setUserId(user.getUserId());
        vo.setPhone(user.getPhone());
        vo.setName(user.getName());
        vo.setArea(user.getArea());
        vo.setGender(user.getGender());
        vo.setSignature(user.getSignature());
        vo.setAvatar(user.getAvatar());
        return vo;
    }
}
